#include "stdio.h"
#include "string.h"

typedef struct _data_gram
{
    int len;
    unsigned char data[8];
}data_gram;

int main(int argc, char * argv[])
{
    data_gram dataGram;
    dataGram.len = 4;
    char data[4] = {0x30,0x02,0x03,0x04};
    memcpy(dataGram.data,data,4);
    long a = data[0]&0x10;
    long b = 0x10;
    if((data[0]&0x10) == 0x10)
    {
        printf("data0 valid\n");
    }
    else
    {
        printf("data0 invalid!!\n");
        //printf("a=%08x,b=%08x\n",a,b);
    }
    return 0;
}
